﻿using System;
using System.Collections;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
using Jy123.Common;

namespace Jy123.Web.Module.TCenter
{    
    public class MyTCenter1 : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            string moduleIdString = context.Request["ModuleId"].ToString();
            string pwdString = context.Request["venuesPwd"].ToString();
            if (!string.IsNullOrEmpty(moduleIdString))
            {
                int moduleId = int.Parse(moduleIdString);
                Jy123.BLL.Module_Main BLLModule = new Jy123.BLL.Module_Main();
                Jy123.Model.Module_Main module = BLLModule.GetModel(moduleId);

                module.Password = Input.MD5(pwdString);
                BLLModule.Update(module);
                string msg = "<script>$(function(){$.moonbox.ok('密码设置成功!');})</script>";
                context.Response.Write(msg);
            }
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}
